<template>
<onekit-page>
<onekit-view onekit-class="container">
	<div is="onekit-template-head" :DATA="`${JSON.stringify({title:'chooseAddress'})}`"></div>
	<onekit-form>
		<onekit-view onekit-class="page-section">
			<onekit-view onekit-class="weui-cells weui-cells_after-title">
				<onekit-view onekit-class="weui-cell weui-cell_input">
					<onekit-view onekit-class="weui-cell__hd">
						<onekit-view onekit-class="weui-label">收货人姓名</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell__bd">{{ addressInfo.userName }}</onekit-view>
				</onekit-view>
				<onekit-view onekit-class="weui-cell weui-cell_input">
					<onekit-view onekit-class="weui-cell__hd">
						<onekit-view onekit-class="weui-label">邮编</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell__bd">{{ addressInfo.postalCode }}</onekit-view>
				</onekit-view>
				<onekit-view onekit-class="weui-cell weui-cell_input region">
					<onekit-view onekit-class="weui-cell__hd">
						<onekit-view onekit-class="weui-label">地区</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell__bd">{{ addressInfo.provinceName }}
            {{ addressInfo.cityName }}
            {{ addressInfo.countyName }}</onekit-view>
				</onekit-view>
				<onekit-view onekit-class="weui-cell weui-cell_input detail">
					<onekit-view onekit-class="weui-cell__hd">
						<onekit-view onekit-class="weui-label">收货地址</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell__bd">{{ addressInfo.detailInfo }}</onekit-view>
				</onekit-view>
				<onekit-view onekit-class="weui-cell weui-cell_input">
					<onekit-view onekit-class="weui-cell__hd">
						<onekit-view onekit-class="weui-label">国家码</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell__bd">{{ addressInfo.nationalCode }}</onekit-view>
				</onekit-view>
				<onekit-view onekit-class="weui-cell weui-cell_input">
					<onekit-view onekit-class="weui-cell__hd">
						<onekit-view onekit-class="weui-label">手机号码</onekit-view>
					</onekit-view>
					<onekit-view onekit-class="weui-cell__bd">{{ addressInfo.telNumber }}</onekit-view>
				</onekit-view>
			</onekit-view>
		</onekit-view>
	</onekit-form>
	<onekit-view onekit-class="page-body">
		<onekit-view onekit-class="btn-area">
			<onekit-button type="primary" @Tap="chooseAddress">获取收货地址</onekit-button>
		</onekit-view>
	</onekit-view>
	<div is="onekit-template-foot"></div>
</onekit-view>
</onekit-page></template>
<script>
/* eslint-disable */
import Vue from 'vue';
import onekit_template_0 from '../../../common/head.head.vue';Vue.component('onekit-template-head',onekit_template_0);
import onekit_template_1 from '../../../common/foot.foot.vue';Vue.component('onekit-template-foot',onekit_template_1);
const ONEKIT_JSON= {
  "navigationBarTitleText": "收货地址",
  "usingComponents": {
    
  }
};
const ONEKIT_SJS = {
};
import wx from '../../../../weixin2vue/wx.js';
import Macro from '../../../../weixin2vue/Macro.js';
const {getApp,getCurrentPages} = Macro;
import Page from '../../../../weixin2vue/OnekitPage.js';
import Component from '../../../../weixin2vue/OnekitComponent.js';
export default Page(ONEKIT_JSON,["addressInfo","userName","postalCode","provinceName","\r\n            ","cityName","countyName","detailInfo","nationalCode","telNumber"],ONEKIT_SJS,{
    "onShareAppMessage"(){
      return {
        "title":'收货地址',
        "path":'packageAPI/pages/choose-address/choose-address'
};
    },
    "data":{
        "addressInfo":null
},
    "chooseAddress"(){
      wx.chooseAddress({
        "success":(res)=>{this.setData({
            "addressInfo":res
})},
        "fail"(err){
          console.log(err);
        }
});
    }
});

</script>
<style 
 lang="css">
@import '/common/lib/weui.css';
.onekit-form {
  margin-top: 15px ;
}
.weui-cell__bd {
  display: flex ;
  justify-content: flex-start ;
  align-items: center ;
  padding: 10px 0 ;
  min-height: 30px ;
}
</style>